home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AOL File Library: 2,801 to 2,900
/
aol-file-protocol-4400-2801-to-2900.zip
/
AOLDLs
/
C++ Files Library
/
Acere (PowerPlant, Game) 1.2
/
AcereÄ.sit
/
Acereƒ
/
Code
/
CardWindow.cp
< prev
next >
Wrap
Text File
|
1995-03-04
|
2KB
|
105 lines
#include "CardWindow.h"
#include "CTextDoc.h"
#include "WellStack.h"
#include "WellFreeCell.h"
#include "WellDeck.h"
#include "CardDeck.h"
#include <UReanimator.h>
extern CTextDoc *theDoc;
CardWindow::CardWindow() : LWindow()
{
}
CardWindow::CardWindow(const SWindowInfo &inWindowInfo) : LWindow(inWindowInfo)
{
}
CardWindow::CardWindow(ResIDT inWINDid, Uint32 inAttributes,
LCommander *inSuperCommander)
: LWindow(inWINDid, inAttributes, inSuperCommander)
{
}
CardWindow::CardWindow(LStream *inStream) : LWindow(inStream)
{
}
CardWindow::~CardWindow()
{
// LWindow::~LWindow();
}
CardWindow* CardWindow::CreateWindow(ResIDT inWindowID,
LCommander *inSuperCommander)
{
// CGrafPtr theMacPort;
PixPatHandle thePixPat;
SetDefaultCommander(inSuperCommander);
CardWindow *theWindow =
(CardWindow*) UReanimator::ReadObjects('PPob', inWindowID);
thePixPat = GetPixPat(1000);
BackPixPat(thePixPat);
theWindow->FinishCreate();
// theMacPort = GetMacPort();
// SetPort((GrafPtr)theMacPort);
if (theWindow->HasAttribute(windAttr_ShowNew))
{
theWindow->Show();
}
return theWindow;
}
CardWindow* CardWindow::CreateCardWindowStream(LStream *inStream)
{
// CardWindow *theCardWindow = new CardWindow(inStream);
return (new CardWindow(inStream));
}
void CardWindow::DrawSelf()
{
// RgnHandle theRgnToUpdate;
// short i;
if (HasAttribute(windAttr_EraseOnUpdate)) {
EraseRect(&mMacWindowP->portRect);
}
/* theRgnToUpdate = NewRgn();
RectRgn(theRgnToUpdate, &mMacWindowP->portRect);
for (i= 0; i < 4; i++)
{
DiffRgn(theRgnToUpdate, theDoc->theDeckWells[i]->GetCardRegion(), theRgnToUpdate);
DiffRgn(theRgnToUpdate, theDoc->theFreeCells[i]->GetCardRegion(), theRgnToUpdate);
DiffRgn(theRgnToUpdate, theDoc->theStacks[i]->GetCardRegion(), theRgnToUpdate);
DiffRgn(theRgnToUpdate, theDoc->theStacks[i+4]->GetCardRegion(), theRgnToUpdate);
}
EraseRgn(theRgnToUpdate);
DisposeRgn(theRgnToUpdate);
for (i= 0; i < 4; i++)
{
theDoc->theDeckWells[i]->Draw(0L);
theDoc->theFreeCells[i]->Draw(0L);
theDoc->theStacks[i]->Draw(0L);
theDoc->theStacks[i+4]->Draw(0L);
}
*/
// now's time to remove the other stuff
}